// 导入http模块
const http = require('http');
//创建服务对象
const server = http.createServer((request, response) => { //request(请求), response(响应)-形参
    // 设置响应头部
    response.setHeader('content-type', 'text/html;charset=utf-8') //设置字符集为:utf-8 (如果不设置中文会乱码)
        // 设置响应体
    response.end('WellCome to register！！')
});
// 监听端口,启动服务
server.listen(9000, () => { //server.listen(9000);9000-端口号  80是默认端口号
    console.log('The service has already been opened!!!');
});